package anime.play.room;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "animeplayhistorymodel")
public class AnimePlayHistoryModel {

    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id", typeAffinity = ColumnInfo.INTEGER)
    private int id;
    @ColumnInfo(name = "speed", typeAffinity = ColumnInfo.INTEGER)
    private long speed;

    //第几集
    @ColumnInfo(name = "name", typeAffinity = ColumnInfo.TEXT)
    private String name;


    @ColumnInfo(name = "type", typeAffinity = ColumnInfo.INTEGER)
    private int type;

    @ColumnInfo(name = "lryId", typeAffinity = ColumnInfo.TEXT)
    private String lryId;

    @ColumnInfo(name = "yhid", typeAffinity = ColumnInfo.INTEGER)
    private int yhid;

    public AnimePlayHistoryModel(int id, long speed, String name, String titlename, String url, String pic, int type, String lryid) {
        this.id = id;
        this.speed = speed;
        this.name = name;
        this.titlename = titlename;
        this.url = url;
        this.pic = pic;
        this.type = type;
        this.lryId = lryid;
    }


    public AnimePlayHistoryModel(int id, long speed, String name, String titlename, String url, String pic, int type, int yhid) {
        this.id = id;
        this.speed = speed;
        this.name = name;
        this.titlename = titlename;
        this.url = url;
        this.pic = pic;
        this.type = type;
        this.yhid = yhid;
    }


    public String getLryId() {
        return lryId;
    }

    public void setLryId(String lryId) {
        this.lryId = lryId;
    }

    public int getYhid() {
        return yhid;
    }

    public void setYhid(int yhid) {
        this.yhid = yhid;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    //动漫名字
    @ColumnInfo(name = "titlename", typeAffinity = ColumnInfo.TEXT)
    private String titlename;


    @ColumnInfo(name = "url", typeAffinity = ColumnInfo.TEXT)
    private String url;


    @ColumnInfo(name = "pic", typeAffinity = ColumnInfo.TEXT)
    private String pic;


    public String getTitlename() {
        return titlename;
    }

    public void setTitlename(String titlename) {
        this.titlename = titlename;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }


    public long getSpeed() {
        return speed;
    }

    public void setSpeed(long speed) {
        this.speed = speed;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "HistoryModel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
